package com.grieous.wow.entity;

import java.io.Serializable;
import java.util.Date;

import com.grieous.wow.common.DateUtil;
import com.grieous.wow.common.Line;
import com.grieous.wow.common.Status;

public class Content implements Serializable {

	private static final long serialVersionUID = 1L;
	private Integer id;
	private String title;
	private String openTime;
	private String line;
	private String site;
	private String desc;
	private String status;
	private Tag tag;
	private String deadline;
	private String qq;
	private Date createTime;
	private Date modifyTime;

	
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getTitle() {
		return title;
	}

	public String getTitle10() {
		if (title != null && !title.equals("") && title.length() > 9) {
			return desc.substring(0, 9);
		}
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getOpenTime() {
		return openTime;
	}

	public void setOpenTime(String openTime) {
		this.openTime = openTime;
	}

	public String getLine() {
		return line;
	}

	public String getLineName() {
		return Line.getName(line);
	}

	public void setLine(String line) {
		this.line = line;
	}

	public String getSite() {
		return site;
	}

	public void setSite(String site) {
		this.site = site;
	}

	public String getDesc() {
		return desc;
	}

	public String getDesc10() {
		if (desc != null && !desc.equals("") && desc.length() > 10) {
			return desc.substring(0, 10);
		}
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}

	public String getQq() {
		return qq;
	}

	public void setQq(String qq) {
		this.qq = qq;
	}

	public String getStatusName() {
		return Status.getName(status);
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public String getCreateTimeStr() {
		return DateUtil.getDateStr("yyyy-MM-dd HH:mm", createTime);
	}

	public void setCreateTime(Date createTime) {

		this.createTime = createTime;
	}

	public Date getModifyTime() {
		return modifyTime;
	}

	public void setModifyTime(Date modifyTime) {
		this.modifyTime = modifyTime;
	}

	public String getStatus() {
		return status;
	}

	public Tag getTag() {
		return tag;
	}

	public void setTag(Tag tag) {
		this.tag = tag;
	}

	public String getDeadline() {
		return deadline;
	}

	public void setDeadline(String deadline) {
		this.deadline = deadline;
	}

}
